                        <td>
                            <select name="national" id="country" class="select" onChange="event_area.getCities();">
                                <?php if ($this->rowNational): ?>
                                    <?php foreach ($this->rowNational as $key => $value){ ?>
                                        <option value="<?php print $key; ?>" <?php if ($key == $this->countryid) echo "selected=\"selected\""; ?>><?php print $value; ?></option>
                                    <?php } ?>
                                <?php endif; ?>
                            </select>
                        </td>
                        <td>            
                            <select name="city" id="city" class="select" onChange="event_area.getDistricts();" style="width:120px">
                                <option value="0">Tỉnh/Thành phố</option>
                                <?php if ($this->rowCity): ?>
                                    <?php foreach ($this->rowCity as $key => $value){ ?>
                                        <option value="<?php print $key; ?>" <?php if ($key == $this->cityid) echo "selected=\"selected\""; ?>><?php print $value; ?></option>
                                    <?php } ?>
                                <?php endif; ?>
                            </select>
                        </td>
                        <td>
                            <select name="district" id="district" class="select" style="width:105px">
                                <option value="0">Quận Huyện</option>
                                <?php if ($this->rowDistrict): ?>
                                    <?php foreach ($this->rowDistrict as $key => $value){ ?>
                                        <option value="<?php print $key; ?>" <?php if ($key == $this->districtid) echo "selected=\"selected\""; ?>><?php print $value; ?></option>
                                    <?php } ?>
                                <?php endif; ?>
                            </select>
                        </td>

<label id="loading" style="display: none;"><img src="<?php echo EVENT_STATIC_SERVER;?>/images/icon_progress.gif"/></label>

<script language="javascript">
var doing=false;

$("#national2").change(function(){
    if (doing)
        return;
    doing=true;                
    $("#loading").show();
    $.post("<?php echo "http://www.tamtay.vn/ttlocation/loadLocation";?>", 
        {Id: $("#national").val(), type:"city"}, 
        function(data){ 
            data = "<option value = '0' selected>Tỉnh/Thành phố</option>"+data;
            $("#city").html(data);
            $("#city").val(0);                            
            $("#district").html("<option value = '0' selected>Quận/Huyện</option>");
            $("#loading").hide();
            doing=false;
        }
    );
});

$("#city2").change(function(){
    if (doing)
        return;
    doing=true;                    
    $("#loading").show();
    $.post("<?php echo "http://www.tamtay.vn/ttlocation/loadLocation";?>", 
        {Id: $("#city").val(), type:"district"}, 
        function(data){ 
            data = "<option value = '0' selected='selected'>Quận/Huyện</option>"+data;
            $("#district").html(data);
            $("#district").val(0);
            $("#loading").hide();
            doing=false;
        }
    );
});
    
</script>
